//
//  InformationListApi.m
//  gamebox_qpp
//
//  Created by 赵隆杰 on 2021/12/20.
//

#import "InformationListApi.h"

@implementation InformationListApi
{
    NSNumber *_typeId;
}

- (instancetype)initWithType:(NSNumber *)typeId
{
    if (self = [super init])
    {
        _typeId = typeId;
    }
    
    return self;
}

- (NSString *)requestUrl {
    NSString *url = [NSString stringWithFormat:@"ios-message/type/%@", _typeId.stringValue];
    return url;
}

- (YTKRequestMethod)requestMethod {
    return YTKRequestMethodGET;
}

- (id)requestArgument {
    
    NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
    
    if (_typeId.integerValue) {
        params[@"typeId"] = _typeId;
    }
    params[@"pageNum"] = @(self.pageNum);
    params[@"pageSize"] = @(self.pageSize);
    
    return params;
}


@end
